import request from "@/utils/request";


// 获取商品列表
const fetchItems = (params = {}) => {
    return request.get('/itemLists', {params})
}
// 删除商品 id 
const deleteIItem = (params = {}) => request.delete('/delItem', params)

// 修改商品 id
const changeItemDetail =  (params = {}) => request.put('/updateItems', params)
// 获取单个商品详情
const getItemDetail = (params = {}) => request.get('/getItemDetail', { params })
// 新增商品
const addItem = (params = {}) => {
    return request.post('/addItem', params)
}

export {
    fetchItems,
    deleteIItem,
    changeItemDetail,
    getItemDetail,
    addItem
}